1. Field of Invention
The present invention relates to a semiconductor device having a non-volatile memory, such as a microcomputer, and also to electronic equipment including such a semiconductor device.
2. Prior Art
In semiconductor devices of the above type, it is desirable that they have a security function for protecting a program from being falsely copied by third parties. One technique of realizing such a security function is to set read protection for the data in a non-volatile memory by means of protection bits, as disclosed in Japanese Patent Application Laid-Open No. 62-194565. In this case, read protection may be set by utilizing an erasable programmable read-only memory (EPROM) which is a second non-volatile memory or by utilizing an electrically erasable and programmable read-only memory (EEPROM).
However, the technique of utilizing the EPROM has a problem in that a semiconductor device will not be able to be re-used once the information that read protection is enabled has been stored in the EPROM. In other words, read protection cannot be released unless after the resin package in which the semiconductor device is mounted has peeled, the EPROM therein is irradiated by a radiation such as ultraviolet rays to change the contents stored in the EPROM. This means that the semiconductor device will never be re-utilized after read protection has been released.
On the other hand, the other technique of utilizing the EEPROM has a problem in that read protection can easily be released by third parties. To overcome such a problem, it is required that read protection once set cannot be released. However, this will resultingly preclude the re-use of the semiconductor device.